import axios from 'axios';

const API_BASE_URL = 'http://localhost:9208'; // 根据实际情况调整

export const fetchMails = async () => {
  try {
    const response = await axios.get(`${API_BASE_URL}/mail/getMail`);
    return response.data;
  } catch (error) {
    console.error('获取邮件列表失败:', error);
    throw error;
  }
};
